package com.bond.controller;

import com.bond.common.ScanCount;
import com.bond.entry.ScanReqInfo;
import com.bond.service.SysService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.servlet.ModelAndView;

import java.util.List;

@Controller
public class ViewController {

    @Autowired
    private SysService sysService;

    @GetMapping("/")
    public String index() {
        return "index";
    }

    @GetMapping("/view/distribution")
    public String viewDistribution() {
        return "/deviceinfo/distribution";
    }

    @GetMapping("/view/distribution/add")
    public String viewScan() {
        return "/deviceinfo/add";
    }


    @GetMapping("/view/scanCount")
    public String viewScanCount() {
        return "/scandata/scancount";
    }

    @GetMapping("/view/scanlist")
    public ModelAndView viewScanCount(String deviceId, ModelAndView modelAndView) {
        modelAndView.addObject("deviceId", deviceId);
        modelAndView.setViewName("/scandata/scanlist");
        return modelAndView;
    }
}
